/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyetech.springstage.core.entity.AbstractEntity;
import javax.validation.constraints.NotEmpty;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * ClassName: Stock <br/>
 * Function: 库存 <br/>
 * date: 2018-11-10 14:56:59 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="stocks")
public class Stock extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 物品id 
    @Column(name="material_id")
	private Long materialId = null;

	// 仓库id 
    @Column(name="warehouse_id")
	private Long warehouseId = null;

	// 库存数量 
    @Column(name="count",scale=2)
	private Double count = null;

	// 成本均价 
    @Column(name="cost",scale=2)
	private Double cost = null;

	// 库存金额 
    @Column(name="amount",scale=2)
	private Double amount = null;


    @Tolerate
	public Stock() {
		
	}
    @Tolerate
	public Stock(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取物品id
	 */
	public Long getMaterialId() {
		return this.materialId;
	}

    /**
     * 设置物品id
     */
	public Stock setMaterialId(Long materialId) {
		this.materialId = materialId;
		return this;
	}

	/**
	 * 获取仓库id
	 */
	public Long getWarehouseId() {
		return this.warehouseId;
	}

    /**
     * 设置仓库id
     */
	public Stock setWarehouseId(Long warehouseId) {
		this.warehouseId = warehouseId;
		return this;
	}

	/**
	 * 获取库存数量
	 */
	public Double getCount() {
		return this.count;
	}

    /**
     * 设置库存数量
     */
	public Stock setCount(Double count) {
		this.count = count;
		return this;
	}

	/**
	 * 获取成本均价
	 */
	public Double getCost() {
		return this.cost;
	}

    /**
     * 设置成本均价
     */
	public Stock setCost(Double cost) {
		this.cost = cost;
		return this;
	}

	/**
	 * 获取库存金额
	 */
	public Double getAmount() {
		return this.amount;
	}

    /**
     * 设置库存金额
     */
	public Stock setAmount(Double amount) {
		this.amount = amount;
		return this;
	}

}
